var goodsList =[
  {
    goodsCode:1,
    goodsName:'香水',
    goodsPrice:159,
    goodsPic:'../../images/001.jpg',
    goodsDec:'香橙的香水'
  },
  {
    goodsCode:2,
    goodsName:'电单车',
    goodsPrice:1599,
    goodsPic:'../../images/002.jpg',
    goodsDec:'快速的电单车'
  },
  {
    goodsCode:3,
    goodsName:'手表',
    goodsPrice:1099,
    goodsPic:'../../images/003.jpg',
    goodsDec:'精美的手表'
  },
  {
    goodsCode:4,
    goodsName:'手机',
    goodsPrice:5559,
    goodsPic:'../../images/004.jpg',
    goodsDec:'苹果手机'
  },
  {
    goodsCode:5,
    goodsName:'口红',
    goodsPrice:59,
    goodsPic:'../../images/001.jpg',
    goodsDec:'粉红口红'
  },
  {
    goodsCode:6,
    goodsName:'旅行箱',
    goodsPrice:109,
    goodsPic:'../../images/006.jpg',
    goodsDec:'红色旅行箱'
  }
]

function getGoodsList(){
  return goodsList;
}

function getGoodsListByIndex(indexList){
  var goodsNewList =[];
  for(let i=0;i<indexList.length;i++){
    var index = indexList[i].index
    var goods = goodsList[index]
    goodsNewList.push(goods)
  }
return  goodsNewList
}
module.exports={
  getGoodsList:getGoodsList,
  getGoodsListByIndex:getGoodsListByIndex,
}